Skip to content

sensors: Call GenericSensorTest.reset() in a cleanup function. #23629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 15, 2020

This addresses some of the flakiness in the sensors tests, in addition to
helping make it easier to find other sources of flakiness.

Instead of calling GenericSensorTest.reset() in a finally clause, use
t.add_cleanup() instead. The latter's behavior is more deterministic (see
#17924), and fixes an issue
where an EventWatcher would fail an assertion when receiving an unexpected
event, and GenericSensorTest.reset() would either not be called or called
after other tests had already started running.

Bug: 731018
Change-Id: Ifbb95b8067b153b70ecb3e6509f476164afd022e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203378
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769442}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

This addresses some of the flakiness in the sensors tests, in addition to
helping make it easier to find other sources of flakiness.

Instead of calling GenericSensorTest.reset() in a `finally` clause, use
t.add_cleanup() instead. The latter's behavior is more deterministic (see
#17924), and fixes an issue
where an EventWatcher would fail an assertion when receiving an unexpected
event, and GenericSensorTest.reset() would either not be called or called
after other tests had already started running.

Bug: 731018
Change-Id: Ifbb95b8067b153b70ecb3e6509f476164afd022e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203378
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769442}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2203378 branch from 7a8f034 to 1059839 Compare May 15, 2020 22:58
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit e909362 into master May 15, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-2203378 branch May 15, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants